-
Notifications
You must be signed in to change notification settings - Fork 8.1k
MSPI_DW DMA and Async support #94469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
MSPI_DW DMA and Async support #94469
Conversation
Current known issues/to do list for this PR:
To be done in follow-up PR:
|
ce8a013
to
c095bba
Compare
266a237
to
aa46e61
Compare
3b17e2e
to
3c55ba4
Compare
8761bd1
to
2827f5e
Compare
2827f5e
to
235a0c3
Compare
Thanks very much for your review @anangl, lots of helpful comments. Hopefully the latest push fixes most of them. I've also added a few replies to your comments for your input. |
0fa1414
to
1d94cb0
Compare
1d94cb0
to
af0dc30
Compare
af0dc30
to
ebd36d4
Compare
ebd36d4
to
694e6ab
Compare
694e6ab
to
523f677
Compare
#define MSPI_DW_DMA_XFER_LIST_GET(inst) &mspi_dw_##inst##_transfer_list | ||
#define MSPI_DW_DMA_JOBLIST_GET(inst) &mspi_dw_##inst##_joblist | ||
|
||
static inline void vendor_specific_start_dma_xfer(const struct device *dev) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it actually beneficial to have three separate functions: vendor_specific_start_dma_xfer()
, vendor_specific_setup_dma_xfer()
, and vendor_specific_dma_accessible_check()
, instead of just one that would do all that is needed to start the DMA transfer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have resolved an issue which means we do not need seperate vendor_specific_start_dma_xfer()
and vendor_specific_setup_dma_xfer()
functions but I still believe we need a seperate vendor_specific_dma_accessible_check()
function even if we are now calling it from just start_next_packet
now. I think this check should happen before any configuration of the peripheral so it doesn't remain initialised on error. I guess we could also call the finalize_transceive/finalize_packet functions to cleanup on the error but not sure this is a better solution?
The nrf-qspi-v2 peripheral is similar to EXMIF on nrf54h20 but supports DMA and slave-mode. The wrapper around the SSI IP is also different with DMA features. Signed-off-by: David Jewsbury <[email protected]>
Support for new MSPI peripheral where there is no PSEL so pins are setup through CTRLSEL. Signed-off-by: David Jewsbury <[email protected]>
This is a new callback option that drivers can use for when a request or xfer has timed out. E.g if an Async RX request never received anything, this callback can be used so a user can clean up their application. Signed-off-by: David Jewsbury <[email protected]>
enum mspi_op_mode in mspi.h has different syntax to this binding. Aligning these will allow for cleaner code in the implmented drivers. Signed-off-by: David Jewsbury <[email protected]>
Handling of asynchronous transfers uses the system workqueue, hence they are not available when multithreading is disabled. Also add missing dependency on multithreading in the MSPI_DW_HANDLE_FIFOS_IN_SYSTEM_WORKQUEUE Kconfig option. Signed-off-by: David Jewsbury <[email protected]> Signed-off-by: Andrzej Głąbek <[email protected]>
MSPI slave mode is selected through devicetree using the op-mode property. Mode selected by SSIISMST bit in the CTRLR0 register. EXMIF can only be Master (controller). Signed-off-by: David Jewsbury <[email protected]>
Initial DMA support. DMA supports implementation of SSI IP but using vendor specific DMA in the wrapper. The setup of the DMA is done in mspi_dw_vendor_specific.h. Signed-off-by: David Jewsbury <[email protected]>
523f677
to
6875795
Compare
|
PR for the mspi_dw driver to support Async and DMA transactions and support for the new nrf-mspi peripheral (name tbc). This peripheral is similar to the exmif in nRF54H20, using the same core designware IP, but has been configured to support DMA and slave mode. The DMA being used is part of the wrapper and not the core IP.
Concurrent Aync transactions and XiP support for nrf-mspi will be added in a future PR. The DMA support uses the DMA in a vendor specific wrapper.